import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import pxtovw from 'postcss-px-to-viewport';
const path = require('path');
const loder_pxtovw = pxtovw({
	//这里是设计稿宽度 自己修改
	viewportWidth: 750,
	viewportUnit: 'vw',
});
export default defineConfig({
	base: './',
	plugins: [vue()],
	css: {
		postcss: {
			plugins: [require('tailwindcss'), require('autoprefixer'), loder_pxtovw],
		},
	},
	resolve: {
		// 配置路径别名
		alias: {
			'@': path.resolve(__dirname, './src'),
		},
	},
});
